from selenium import webdriver
from selenium.webdriver.common.by import By
import time

web = webdriver.Firefox()
web.implicitly_wait(1)
web.get('https://weixin50541.bdc-rays.com/W50541/C1000366/product/redirect/10003143?type=TOOL&orderNum=16497730058393665655811&is_pay_back=1&isBuy=1&buyGuide=1&express=1&openid=oTvNM053cy_0vBXKEveY0uj9z0ZY')

web.find_element(By.CLASS_NAME, 'right-content').click()
web.find_element(By.CSS_SELECTOR, 'footer>a:nth-child(2)').click()
web.find_element(By.CSS_SELECTOR, 'div[class*="buy"]').click()
web.find_element(By.CSS_SELECTOR, 'div[class*=mt20]').click()
web.find_element(By.CSS_SELECTOR, 'div[class*=link]').click()
web.find_element(
    By.CSS_SELECTOR, '[style="display: block;"]>div:nth-child(4)>div').click()


time.sleep(5)
web.quit()
